package com.njust.bean;

import java.util.List;

/**
 * 实验13、基于XML的自动装配（自定义类型自动赋值）
 */
public class XmlAutowire {

    private Car car;

    private List<Book> books;


    public XmlAutowire() {
    }

    public XmlAutowire(Car car) {
        System.out.println("可以为car赋值的有参构造器");
        this.car = car;
    }

    @Override
    public String toString() {
        return "XmlAutowire{" +
                "car=" + car +
                ", books=" + books +
                '}';
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }
}
